
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for dmJjfl.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="dmJjflForm"
 */
public class DmJjflForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _jjflDm = null;
   private java.lang.String _jjflMc = null;

   /**
    * Standard constructor.
    */
   public DmJjflForm() {
   }

   /**
    * Returns the jjflDm
    *
    * @return the jjflDm
    */
   public java.lang.String getJjflDm() {
      return _jjflDm;
   }

   /**
    * Sets the jjflDm
    *
    * @param jjflDm the new jjflDm value
    */
   public void setJjflDm(java.lang.String jjflDm) {
      _jjflDm = jjflDm;
   }
   /**
    * Returns the jjflMc
    *
    * @return the jjflMc
    */
   public java.lang.String getJjflMc() {
      return _jjflMc;
   }

   /**
    * Sets the jjflMc
    *
    * @param jjflMc the new jjflMc value
    */
   public void setJjflMc(java.lang.String jjflMc) {
      _jjflMc = jjflMc;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getJjflDm() == null) {
         errors.add("jjflDm", new ActionError("error.jjflDm.required"));
      }
      // TODO test format/data
      return errors;
   }
}
